﻿using System;
using GeoAPI.Geometries;

namespace NetTopologySuite.Algorithm.Match
{
	public class AreaSimilarityMeasure : ISimilarityMeasure
	{
		public double Measure(IGeometry g1, IGeometry g2)
		{
			double area = g1.Intersection(g2).Area;
			double area2 = g1.Union(g2).Area;
			return area / area2;
		}
	}
}
